<?php
// R0910CMS 
// created by TLightSky
// time : 20100120

if(!defined("IN_R0910CMS")) {
    exit("Access Denied!");
}

class Admin_DbModel_Department extends R_Db_Row {
	function init(){
		$this->tableName   = getInstance('Admin_Manage')->getConfig('sitepre')."department";
        $this->col['id'] = &R_Db_CellFactory::get(R_Db_DataCheck::INTEGER,10);
        $this->col["id"]   ->setPrimary()
                           ->setNotNull()
                           //->setDefaultValue(0)
                           ->setUnsigned()
                           ->setAutoIncrement();
		
		
		
        $this->col["name"]  = &R_Db_CellFactory::get(R_Db_DataCheck::STRING,50);
		$this->col["name"]  ->setNotNull();
        $this->col["father"] = &R_Db_CellFactory::get(R_Db_DataCheck::INTEGER,10);
		$this->col["father"] ->setNotNull();
	}
}
